package com.shoukaiseki.xutils.simple;

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;

import com.lidroid.xutils.HttpUtils;
import com.lidroid.xutils.exception.HttpException;
import com.lidroid.xutils.http.ResponseInfo;
import com.lidroid.xutils.http.callback.RequestCallBack;
import com.lidroid.xutils.http.client.HttpRequest;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;


public class Test006Activity extends Activity{
	
	
	int i=0;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		 ViewGroup.LayoutParams lp_ViewGroup = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
		 LinearLayout mainLayout = new LinearLayout(this);
		 mainLayout.setOrientation(LinearLayout.VERTICAL);
		 setContentView(mainLayout, lp_ViewGroup);

		 LinearLayout.LayoutParams lp_LinearLayout = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
		 Button button = new Button(this);
		 button.setText("Button");
		 mainLayout.addView(button, lp_LinearLayout);

		 lp_LinearLayout = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
		 lp_LinearLayout.gravity = Gravity.CENTER;
		 TextView textView = new TextView(this);
		 textView.setText("TextView");
		 mainLayout.addView(textView, lp_LinearLayout);	
	}	

}
